﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shuba.Model;

namespace Shuba.Business
{
    public class MaintenanceVisitBulk
    {
        private Data.MaintenanceVisitBulk _MaintenanceVisitBulk;

        public MaintenanceVisitBulk() 
        {
            _MaintenanceVisitBulk = new Data.MaintenanceVisitBulk();
        }

        public int GetRowNumberMaintenanceVisitApproval(string update_by, string batch_id)
        {
            return _MaintenanceVisitBulk.GetRowNumberMaintenanceVisitApproval(update_by, batch_id);
        }

        public int GetRowNumberMaintenanceVisitByValues(string value, string batch_id)
        {
            return _MaintenanceVisitBulk.GetRowNumberMaintenanceVisitByValues(value, batch_id);
        }

        public int GetRowNumberMaintenanceVisitReal(string value, string batch_id)
        {
            return _MaintenanceVisitBulk.GetRowNumberMaintenanceVisitReal(value, batch_id);
        }

        public int GetRowNumberMaintenanceVisitFailed(string value, string batch_id)
        {
            return _MaintenanceVisitBulk.GetRowNumberMaintenanceVisitFailed(value, batch_id);
        }

        public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisit(string value, string batch_id, int currPage, int dataPerPage, string sortBy, string sortDir)
        {
            return _MaintenanceVisitBulk.GetListMaintenanceVisit(value, batch_id, currPage, dataPerPage, sortBy, sortDir);
        }

        //public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisitReal(string value, string batch_id, int currPage, int dataPerPage, string sortBy, string sortDir)
        //{
        //    return _MaintenanceVisitBulk.GetListMaintenanceVisitReal(value, batch_id, currPage, dataPerPage, sortBy, sortDir);
        //}

        public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisitReal(string value, string batch_id, int currPage, int dataPerPage, string sortBy, string sortDir)
        {
            return _MaintenanceVisitBulk.GetListMaintenanceVisitReal(value, batch_id, currPage, dataPerPage, sortBy, sortDir);
        }

        public List<MaintenanceVisitBulkInfo> GetListApprovalMaintenanceVisit(string update_by, string batch_id, int currPage, int dataPerPage, string sortBy, string sortDir)
        {
            return _MaintenanceVisitBulk.GetListApprovalMaintenanceVisit(update_by, batch_id, currPage, dataPerPage, sortBy, sortDir);
        }

        public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisitFailed(string value, string batch_id, int currPage, int dataPerPage)
        {
            return _MaintenanceVisitBulk.GetListMaintenanceVisitFailed(value, batch_id, currPage, dataPerPage);
        }

        //public MaintenanceVisitBulkInfo GetApprovalByID(string CIF)
        //{
        //    return _MaintenanceVisitBulk.GetApprovalByID(CIF);
        //}

        public MaintenanceVisitBulkInfo GetApprovalByIDandBatchId(string RECORD_ID, string BATCH_ID)
        {
            return _MaintenanceVisitBulk.GetApprovalByIDandBatchId(RECORD_ID, BATCH_ID);
        }

        public int ApproveBulk(string RECORD_ID, string BATCH_ID, string ActType)
        {
            return _MaintenanceVisitBulk.ApproveBulk(RECORD_ID.Trim(), BATCH_ID.Trim(), ActType);
        }

        public Int32[] ApproveBulkAll(string batch_id,string status)
        {
            return _MaintenanceVisitBulk.ApproveBulkAll(batch_id, status);
        }

        public int Reject(string CIF, string BATCH_ID)
        {
            return _MaintenanceVisitBulk.Reject(CIF.Trim(), BATCH_ID.Trim());
        }

        public void delete(string batch_id)
        {
            _MaintenanceVisitBulk.delete(batch_id);
        }

        public MaintenanceVisitBulkInfo Get(string CIF)
        {
            return _MaintenanceVisitBulk.Get(CIF);
        }

        public int deteleOnBulk(MaintenanceVisitBulkInfo Info)
        {
            return _MaintenanceVisitBulk.deteleOnBulk(Info);
        }

        // FOR ESCEL TMP
        //public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisit(string value, string batch_id) 
        //{
        //    return _MaintenanceVisitBulk.GetListMaintenanceVisit(value, batch_id);
        //}

        public List<MaintenanceVisitBulkInfo> GetListMaintenanceVisitRealExcel(string value, string batch_id)
        {
            return _MaintenanceVisitBulk.GetListMaintenanceVisitRealExcel(value, batch_id);
        }
    }
}
